package com.hmy.equipment.service.impl;

import com.hmy.equipment.domain.HmyAutoFeeding;
import com.hmy.equipment.domain.HmyFans;
import com.hmy.equipment.mapper.HmyAutoFeedingMapper;
import com.hmy.equipment.service.HmyAutoFeedingService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * 自动饲喂机 业务层
 *
 * @author yyh
 */
@Service
public class HmyAutoFeedingServiceImpl implements HmyAutoFeedingService {
    private static final Logger log = LoggerFactory.getLogger(HmyAutoFeedingServiceImpl.class);
    @Resource
    private HmyAutoFeedingMapper hmyAutoFeedingMapper;

    /**
    *  * @param null
    * @return int
    * @author kdq
    * @date 2024/1/29 19:07
    * @description 添加自动饲喂机
    */
    @Override
    public int addAutoFeeding(HmyAutoFeeding hmyAutoFeeding) {
        return hmyAutoFeedingMapper.addAutoFeeding(hmyAutoFeeding);
    }


    /**
    *  * @param null
    * @return
    * @author kdq
    * @date 2024/1/30 11:24
    * @description 修改自动饲喂机
    */
    @Override
    public int editHmyAutoFeeding(HmyAutoFeeding hmyAutoFeeding) {
        return hmyAutoFeedingMapper.editHmyAutoFeeding(hmyAutoFeeding);
    }


    /**
    *  * @param null
    * @return
    * @author kdq
    * @date 2024/1/30 21:59
    * @description 查询所有自动饲喂机列表
    */
    @Override
    public List<HmyAutoFeeding> selectAllAF(Long autofeedingId,
                                            String autofeedingBand,
                                            String phouseCode) {
        return hmyAutoFeedingMapper.selectAllAF(autofeedingId,autofeedingBand,phouseCode);
    }


    /**
    *  * @param null
    * @return
    * @author kdq
    * @date 2024/1/30 22:17
    * @description 根据id删除单条记录
    */
    @Override
    public int deleteById(Long[] ids) {
        return hmyAutoFeedingMapper.deleteById(ids);
    }


    /**
    *  * @param null
    * @return
    * @author kdq
    * @date 2024/2/1 13:25
    * @description 根据id查询单条记录
    */
    @Override
    public HmyAutoFeeding selectById(Long id) {
        return hmyAutoFeedingMapper.selectById(id);
    }
}
